package out_in_putStream;

import java.io.*;

public class utf_8__gbk {
    public static void main(String[] args) throws IOException {
        FileInputStream fis = new FileInputStream("C:\\Users\\啦啦啦\\Desktop\\b.txt");
        InputStreamReader isr = new InputStreamReader(fis,"utf-8");
        FileOutputStream fos = new FileOutputStream("C:\\Users\\啦啦啦\\Desktop\\d.txt");
        OutputStreamWriter osr = new OutputStreamWriter(fos,"gbk");
        int len=0;
        while((len=isr.read())!=-1)
        {
            osr.write(len);
        }
        isr.close();
        osr.close();
    }
}
